package alex.example.pruebas2;

import java.util.ArrayList;

import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.support.v4.app.NavUtils;

@SuppressWarnings("deprecation")
public class MainActivity extends TabActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        

        TabHost tabHost= getTabHost();
        
     // Tab for Maps
        TabSpec mapsTab = tabHost.newTabSpec("Maps");
        // setting Title and Icon for the Tab
        mapsTab.setIndicator("", getResources().getDrawable(R.drawable.icon_maps_tab));
        Intent mapsIntent = new Intent(this, Map.class);
        mapsTab.setContent(mapsIntent);
        
     // Tab for Stones
        TabSpec stonesTab = tabHost.newTabSpec("Piedras");
        // setting Title and Icon for the Tab
        stonesTab.setIndicator("", getResources().getDrawable(R.drawable.icon_stones_tab));
        Intent stonesIntent = new Intent(this, Stones.class);
        stonesTab.setContent(stonesIntent);
        
     // Tab for Videos
        TabSpec videosTab = tabHost.newTabSpec("Videos");
        // setting Title and Icon for the Tab
        videosTab.setIndicator("",getResources().getDrawable(R.drawable.icon_videos_tab));
        Intent videosIntent = new Intent(this, Video.class);
        videosTab.setContent(videosIntent);
        
        tabHost.addTab(mapsTab);
        tabHost.addTab(stonesTab);
        tabHost.addTab(videosTab);
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    
}
